package com.compass.network.api


import com.compass.framework.model.AddBankCard
import com.compass.framework.model.AllDictionariesWarp
import com.compass.framework.model.AuthInfo
import com.compass.framework.model.BankCard
import com.compass.framework.model.BaseArticleOrVideo
import com.compass.framework.model.BaseComment
import com.compass.framework.model.BaseOrderSpecial
import com.compass.framework.model.CaseHistory
import com.compass.framework.model.CaseHistoryWarp
import com.compass.framework.model.ConsultSetting
import com.compass.framework.model.ConsultationOrder
import com.compass.framework.model.ConsultationWarp
import com.compass.framework.model.Consumable
import com.compass.framework.model.ConsumableOrder
import com.compass.framework.model.CreateConsultation
import com.compass.framework.model.CreateConsumable
import com.compass.framework.model.CreateHospitalized
import com.compass.framework.model.CreateInspection
import com.compass.framework.model.CreateInspectionWarp
import com.compass.framework.model.CreationInquiryCase

import com.compass.framework.model.DataStatistics
import com.compass.framework.model.Diagnosis
import com.compass.framework.model.Dictionaries
import com.compass.framework.model.Doctor
import com.compass.framework.model.DoctorCode
import com.compass.framework.model.DoctorUrgency
import com.compass.framework.model.DoctorWrap
import com.compass.framework.model.DrugTabItem
import com.compass.framework.model.EvaluateWarp
import com.compass.framework.model.EvaluationClassification
import com.compass.framework.model.HospitalizedLog
import com.compass.framework.model.HospitalizedLogWarp
import com.compass.framework.model.InpatientWard
import com.compass.framework.model.InquiryCase
import com.compass.framework.model.InquiryMessage
import com.compass.framework.model.InquiryOrderWarp
import com.compass.framework.model.InspectionBean
import com.compass.framework.model.InspectionRecord
import com.compass.framework.model.InspectionRecordWarp
import com.compass.framework.model.InspectionReport
import com.compass.framework.model.Inventory
import com.compass.framework.model.KnowledgeCenter
import com.compass.framework.model.LoginInformation
import com.compass.framework.model.MedicalCareOrder
import com.compass.framework.model.MedicalCareOrderWarp
import com.compass.framework.model.MeetInfo
import com.compass.framework.model.NewPatientWarp
import com.compass.framework.model.NotificationMessage
import com.compass.framework.model.NurseFinish
import com.compass.framework.model.PatientFollowWarp
import com.compass.framework.model.PatientISeeRecord
import com.compass.framework.model.PatientISeeRecordWarp
import com.compass.framework.model.PatientInfo
import com.compass.framework.model.PatientWap
import com.compass.framework.model.PrescriptionInformation
import com.compass.framework.model.PrescriptionStatusWarp
import com.compass.framework.model.PrescriptionTemplate
import com.compass.framework.model.ScreenTag
import com.compass.framework.model.Tag
import com.compass.framework.model.TemplateDetails
import com.compass.framework.model.TodayNumber
import com.compass.framework.model.UnderwayOrder
import com.compass.framework.model.UpdateInfo
import com.compass.framework.model.UsefulExpressions
import com.compass.framework.model.UsefulExpressionsCate
import com.compass.framework.model.UsefulExpressionsCateTemplate
import com.compass.framework.model.UsefulExpressionsTemplate
import com.compass.framework.model.User
import com.compass.framework.model.VAServiceWarp
import com.compass.framework.model.Wallet
import com.compass.framework.model.WalletDetail
import com.compass.framework.model.WithdrawType
import com.compass.network.response.BaseResponse
import com.compass.network.response.RefreshTokenResponse
import com.google.gson.JsonObject
import okhttp3.MultipartBody
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Query


/**
 *
 * @desc   API接口类
 */
interface ApiInterface {


    //登录
    @POST("/app-api/user/doctor/auth/sms-login")
    suspend fun login(@Body responseBody: JsonObject): BaseResponse<LoginInformation?>

    //发送验证码登录的
    @POST("/app-api/user/doctor/auth/send-sms-code")
    suspend fun geSmsCode(@Body responseBody: JsonObject): BaseResponse<Any?>

    //医生/用户基础资料
    @GET("/app-api/user/doctor/info/get")
    suspend fun getUserInfo(): BaseResponse<User?>

    //获取医生咨询设置
    @GET("/app-api/user/consultation-config/get")
    suspend fun getConsultationConfig(): BaseResponse<ConsultSetting?>

    //获取医生咨询设置
    @GET("/app-api/infra/apk-version/query-latest-version?")
    suspend fun getAppVersion(@Query("type") key: String): BaseResponse<UpdateInfo?>

    //修改医生咨询
    @POST("/app-api/user/consultation-config/update")
    suspend fun updateConsultationConfig(@Body responseBody: ConsultSetting?): BaseResponse<Any?>

    //修改医生在线状态
    @POST("/app-api/user/doctor/info/update-online-status")
    suspend fun updateOnlineStatus(@Body responseBody: JsonObject?): BaseResponse<Any?>

    //今日新增已接诊、待接诊数量
    @GET("/app-api/collaboration/order-consultation/consultation-order-today-number")
    suspend fun orderTodayCount(): BaseResponse<TodayNumber?>

    //今日新增问诊数量
    @GET("/app-api/collaboration/order-consultation/consultation-order-new-count")
    suspend fun orderNewCount(): BaseResponse<Any?>

    //注销
    @GET("/app-api/user/doctor/info/logout")
    suspend fun signOut(): BaseResponse<Any?>

    //获取指定字典
    @GET("/app-api/system/dict-data/type?")
    suspend fun getDictionaries(@Query("type") type: String): BaseResponse<MutableList<Dictionaries>?>

    //获取全部字典
    @GET("/app-api/system/dict-data/build")
    suspend fun getDictionaries(): BaseResponse<AllDictionariesWarp?>


    //获取紧急待办列表
    @GET("/app-api/user/doctor-urgency-backlog/list")
    suspend fun doctorUrgency(@Query("type") type: String): BaseResponse<MutableList<DoctorUrgency>?>

    /**
     * 消息通知
     */
    @GET("/app-api/user/doctor-notification-message/page?")
    suspend fun getNotificationMessage(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int
    ): BaseResponse<NotificationMessage?>

    /**
     * 更改消息读取状态
     */
    @POST("/app-api/user/doctor-notification-message/update-message-status")
    suspend fun updateMessage(
        @Query("id") id: String
    ): BaseResponse<Boolean>


    /**
     * 搜索耗材
     */
    @GET("/app-api/hospital/medical-consumable/list?")
    suspend fun getConsumable(
        @Query("keyword") keyword: String
    ): BaseResponse<MutableList<Consumable>?>

    /**
     * 搜索耗材订单
     */
    @GET("/app-api/collaboration/order-nurse-medical-consumable/list")
    suspend fun getConsumableOrder(
        @Query("orderId") orderId: String
    ): BaseResponse<MutableList<ConsumableOrder>?>

    /**
     * 删除耗材订单
     */
    @GET("/app-api/collaboration/order-nurse-medical-consumable/delete")
    suspend fun deleteConsumableOrder(
        @Query("id") id: String
    ): BaseResponse<Any?>

    /**
     * 耗材订单二次支付
     */
    @GET("/app-api/collaboration/order-nurse-medical-consumable/pay")
    suspend fun consumableOrderPay(
        @Query("id") id: String
    ): BaseResponse<String?>

    /**
     * 获取完整卡号
     */
    @GET("/app-api/user/doctor/bank-card/get-number?")
    suspend fun getCardNumber(@Query("id") id: String): BaseResponse<String?>


    /**
     * 创建耗材订单
     */
    @POST("/app-api/collaboration/order-nurse-medical-consumable/create")
    suspend fun createConsumable(@Body responseBody: CreateConsumable): BaseResponse<String?>


    /**
     * 创建银行卡
     */
    @POST("/app-api/user/doctor/bank-card/create")
    suspend fun addBankCard(@Body responseBody: AddBankCard): BaseResponse<Any?>

    /**
     * 删除银行卡
     */
    @POST("/app-api/user/doctor/bank-card/delete")
    suspend fun deleteBankCard(@Body responseBody: JsonObject): BaseResponse<Any?>


    /**
     * 银行卡列表-不分页
     */
    @GET("/app-api/user/doctor/bank-card/list")
    suspend fun getBankCardList(): BaseResponse<MutableList<BankCard>?>

    /**
     * 医护订单
     */
    @GET("/app-api/collaboration/nurse/doctor-page?")
    suspend fun getNurseList(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("type") type: String
    ): BaseResponse<MedicalCareOrderWarp?>

    /**
     * 医护订单详情
     */
    @GET("/app-api/collaboration/nurse/doctor-get?")
    suspend fun getMedicalCareOrderDetails(@Query("id") id: String?): BaseResponse<MedicalCareOrder?>


    /**
     * 知识中心--首页数据
     */
    @POST("/app-api/information/knowledge-center/home")
    suspend fun getKnowledgeInfo(): BaseResponse<KnowledgeCenter?>

    /**
     * 知识中心--最新评论
     */
    @GET("/app-api/information/knowledge-center/commentPage")
    suspend fun getComment(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int
    ): BaseResponse<BaseComment?>


    /**
     * 知识中心--最新购买
     */
    @GET("/app-api/information/knowledge-center/orderPage")
    suspend fun getOrderSpecial(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int
    ): BaseResponse<BaseOrderSpecial?>

    /**
     * 知识中心--文章列表
     */
    @GET("/app-api/information/knowledge-center/articlePage")
    suspend fun articlePage(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("keyword") keyword: String?,
        @Query("separate") separate: String?
    ): BaseResponse<BaseArticleOrVideo?>

    /**
     * 知识中心--视频列表
     */
    @GET("/app-api/information/knowledge-center/videoPage")
    suspend fun videoPage(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("keyword") keyword: String?,
        @Query("separate") separate: String?
    ): BaseResponse<BaseArticleOrVideo?>


    /**
     * 文章视频分享
     */
    @GET("/app-api/information/app-doctor-special-column-journalism/get-custom-message?")
    suspend fun articleAndVideoShare(
        @Query("id") id: String,
        @Query("patientId") patientId: String?,
    ): BaseResponse<Any?>


    /**
     * 问诊列表
     * type 1-待接诊 2-已接诊 3-已完成 可不传所有
     */
    @GET("/app-api/collaboration/order-consultation/consultation-order-page-doctor?")
    suspend fun getConsultationOrder(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("type") type: Int
    ): BaseResponse<InquiryOrderWarp?>



    /**
     * 获取正在进行中的问诊订单
     */
    @GET("/app-api/collaboration/order-consultation/get-afoot-consultation?")
    suspend fun getUnderwayOrder(
        @Query("patientId") patientId: String?
    ): BaseResponse<UnderwayOrder?>

    /**
     * 问诊外呼
     * @param mobileType 1主 2副
     */
    @GET("/app-api/collaboration/order-consultation/have-telephone-consultation?")
    suspend fun consultationCall(
        @Query("id") patientId: String?,
        @Query("doctorMobile") doctorMobile: String?,
        @Query("mobileType") mobileType: String?,

        ): BaseResponse<Any?>


    /**
     * 今日新增问诊数量
     */
    @GET("/app-api/collaboration/order-consultation/consultation-order-new-count")
    suspend fun consultationOrderCount(): BaseResponse<Int?>

    /**
     * 医生接诊/拒诊
     */
    @POST("/app-api/collaboration/order-consultation/clinical-reception")
    suspend fun clinicalReception(@Body responseBody: JsonObject): BaseResponse<Any?>

    /**
     * 医生结束问诊
     */
    @POST("/app-api/collaboration/order-consultation/consultation-order-proposal")
    suspend fun finishInterrogation(@Body responseBody: JsonObject): BaseResponse<Any?>

    /**
     * 医生退诊
     */
    @POST("/app-api/collaboration/order-consultation/consultation-order-retreat")
    suspend fun retreatOrder(@Body responseBody: JsonObject): BaseResponse<Any?>

    /**
     * 接受或拒绝会诊
     */
    @POST("/app-api/collaboration/medical-consultation/consider")
    suspend fun refuseOrAccept(@Body responseBody: JsonObject): BaseResponse<Any?>

    /**
     * 获取紧急待办详情
     */
    @GET("/app-api/user/doctor-urgency-backlog/get")
    suspend fun getUrgencyDetails(@Query("id") orderId: String): BaseResponse<DoctorUrgency?>

    /**
     * 问诊单详情
     */
    @GET("/app-api/collaboration/order-consultation/get")
    suspend fun getInquiryOrderDetails(@Query("id") orderId: String): BaseResponse<InquiryMessage?>

    /**
     * 获取药房列表-拼装药品
     */
    @GET("/app-api/prescription/pharmacy-info/list")
    suspend fun getPharmacyInfo(@Query("drugName") drugName: String?,
        @Query("drugType") drugType: Int?): BaseResponse<MutableList<DrugTabItem>?>

    /**
     * 获取药品库存
     */
    @GET("/app-api/prescription/pharmacy-drug/get-stock-status")
    suspend fun getDrugInventory(
        @Query("id") id: String,
        @Query("num") num: String
    ): BaseResponse<Inventory?>

    /**
     * 获取医生积分/钱包余额
     */
    @GET("/app-api/user/doctor-wallet/get")
    suspend fun getWallet(): BaseResponse<Wallet?>

    /**
     * 提现说明
     */
    @GET("/app-api/user/doctor-wallet/get-withdraw-explain")
    suspend fun getWithdrawExplain(): BaseResponse<String?>

    /**
     * 提现方式
     */
    @GET("/app-api/user/doctor-wallet/get-withdraw-type")
    suspend fun getWithdrawType(): BaseResponse<MutableList<WithdrawType>?>

    /**
     * 医生提现
     */
    @GET("/app-api/user/doctor-wallet/withdraw")
    suspend fun doctorWithdraw(): BaseResponse<String?>

    /**
     * 获取钱包流水-详情
     */
    @GET("/app-api/user/doctor-wallet/getWalletLog")
    suspend fun getWalletDetails(@Query("id") id: String): BaseResponse<WalletDetail?>


    /**
     * 余额明细列表
     */
    @GET("/app-api/user/doctor-wallet/getWalletLogPage")
    suspend fun getWalletDetail(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("type") type: Int = 0
    ): BaseResponse<Wallet?>


    /**
     * 搜索诊断/诊断列表
     */
    @GET("/app-api/prescription/diagnosis-info/get")
    suspend fun getDiagnosisInfo(
        @Query("keyword") keyword: String = "",
        @Query("type") type: String?
    ): BaseResponse<MutableList<Diagnosis>?>

    /**
     * 检查检验列表
     */
    @GET("/app-api/hospital/inspection/list")
    suspend fun getInspectionItem(
        @Query("keyword") keyword: String = "",
        @Query("type") type: String?
    ): BaseResponse<MutableList<Diagnosis>?>


    /**
     * 查询标本和部位
     */
    @GET("/app-api/hospital/inspection/get-sample-body?")
    suspend fun getSampleBody(@Query("type") type: String?): BaseResponse<MutableList<Diagnosis>?>


    /**
     * 检查检验执行科室
     */
    @GET("/app-api/hospital/inspection/get?")
    suspend fun getInspectionDepartments(@Query("id") id: String?): BaseResponse<MutableList<InpatientWard>?>


    /**
     * 搜索科室
     */
    @GET("/app-api/hospital/department/get-execute-dept?")
    suspend fun searchDepartment(@Query("name") name: String?): BaseResponse<MutableList<InpatientWard>?>


    /**
     * 模板详情
     */
    @GET("/app-api/prescription/template/get")
    suspend fun getTemplateDetails(
        @Query("id") id: String?,
        @Query("type") type: String?
    ): BaseResponse<TemplateDetails?>

    /**
     * 模板详情
     */
    @GET("/app-api/prescription/order-prescription/get-log-detail")
    suspend fun getPrescriptionDetails(
        @Query("id") id: String?,
        @Query("type") type: String?
    ): BaseResponse<TemplateDetails?>

    /**
     * 删除模板
     */
    @GET("/app-api/prescription/template/delete?")
    suspend fun deleteTemplate(
        @Query("id") id: String?
    ): BaseResponse<Boolean?>


    /**
     * 创建处方
     */
    @POST("/app-api/prescription/order-prescription/create")
    suspend fun prescriptionCreate(@Body rxInformation: PrescriptionInformation?): BaseResponse<String?>

    /**
     * 创建模板
     */
    @POST("/app-api/prescription/template/create")
    suspend fun templateCreate(@Body rxInformation: PrescriptionInformation?): BaseResponse<String>?

    /**
     * 更新模板
     */
    @POST("/app-api/prescription/template/update")
    suspend fun templateUpdate(@Body rxInformation: PrescriptionInformation?): BaseResponse<Boolean>


    /**
     * 获取处方模板
     */
    @GET("/app-api/prescription/template/page")
    suspend fun getTemplate(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("type") type: Int = 0
    ): BaseResponse<PrescriptionTemplate?>

    /**
     * 作废处方-医生
     */
    @POST("/app-api/prescription/order-prescription/prescription-cancel")
    suspend fun prescriptionCancel(
        @Query("id") id: String,
        @Query("cancelDescription") cancelDescription: String?
    ): BaseResponse<Boolean?>

    /**
     * 处方审核
     */
    @POST("/app-api/prescription/order-prescription/examine-audit?")
    suspend fun prescriptionExamine(
        @Query("id") id: String,
        @Query("status") status: String,
        @Query("cancelDescription") cancelDescription: String?
    ): BaseResponse<Boolean?>


    /**
     * 续方审核  status  0 拒绝 1-统一
     */
    @GET("/app-api/prescription/order-prescription/audit-continue-prescription?")
    suspend fun prescriptionRenewal(
        @Query("id") id: String,
        @Query("status") status: String
    ): BaseResponse<Boolean?>

    /**
     * 医生向患者群发消息
     */
    @POST("/app-api/user/chat-mass-messaging/mass-messaging")
    suspend fun massMessaging(@Body responseBody: JsonObject): BaseResponse<Any?>

    /**
     * 医生向患者赠送条数
     */
    @POST("/app-api/user/chat-mass-messaging/mass-messaging")
    suspend fun giveMessaging(@Body responseBody: JsonObject): BaseResponse<Any?>
    /**
     * 常用语分类列表
     */
    @GET("/app-api/user/doctor-common-phrases-type/list")
    suspend fun getUsefulExpressionsCate(
    ):BaseResponse<MutableList<UsefulExpressionsCate>?>
    /**
     * 常用语分类列表(统计条数)
     */
    @GET("/app-api/user/doctor-common-phrases-type/listCount")
    suspend fun getUsefulExpressionsCateByCount(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
    ):BaseResponse<MutableList<UsefulExpressionsCate>?>
    /**
     * 添加常用语分类
     */
    @POST("/app-api/user/doctor-common-phrases-type/create")
    suspend fun addUsefulExpressionsCate(@Body responseBody: JsonObject):BaseResponse<Any?>
    /**
     * 删除语分类列表
     */
    @POST("/app-api/user/doctor-common-phrases-type/delete")
    suspend fun delUsefulExpressionsCate(@Query("ids") id: String):BaseResponse<Any?>
    /**
     * 添加常用语
     */
    @POST("/app-api/user/doctor-common-phrases/create")
    suspend fun addUsefulExpressions(@Body responseBody: JsonObject):BaseResponse<Any?>

    /**
     * 根据常用语分类id查询常用语列表数据
     */
    @GET("/app-api/user/doctor-common-phrases/list")
    suspend fun getUsefulExpressionsListByCate(
        @Query("typeId") id:String,
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
    ):BaseResponse<MutableList<UsefulExpressions>?>

    /**
     * 根据常用语分类查询常用语列表数据-默认常用语查询
     */
    @GET("/app-api/user/hospital-common-phrases/list")
    suspend fun getUsefulExpressionsListByCate(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
    ):BaseResponse<MutableList<UsefulExpressions>?>
    /**
     * 常用语-删除医生常用语，默认常用语不能删除
     */
    @POST("/app-api/user/doctor-common-phrases/delete")
    suspend fun deleteUsefulExpressions(@Query("ids") id:String):BaseResponse<Any?>

    /**
     * 历史处方-处方模板
     */
    @POST("/app-api/prescription/order-prescription/get-log")
    suspend fun getHisPrescription(@Body responseBody: JsonObject): BaseResponse<PrescriptionTemplate?>

    /**
     * 服务产品列表
     */
    @POST("/his/app-api/servicePatientList")
    suspend fun getServicePatientList(@Body responseBody: JsonObject): BaseResponse<VAServiceWarp?>

    /**
     * 生成二维码
     */
    @POST("/his/app-api/generateQRcode")
    suspend fun generateQRCode(@Body responseBody: JsonObject): BaseResponse<String?>

    /**
     *  处方审核 列表
     */
    @POST("/app-api/prescription/order-prescription/get-log-audit")
    suspend fun getRxExamine(@Body responseBody: JsonObject): BaseResponse<PrescriptionTemplate?>

    /**
     * 获取处方记录总金额-处方模板
     */
    @POST("/app-api/prescription/order-prescription/get-log-total")
    suspend fun getHisPrescriptionTotal(@Body responseBody: JsonObject): BaseResponse<Long?>

    /**
     * 处方记录-个人中心
     */
    @POST("/app-api/prescription/order-prescription/query-order-prescription-page")
    suspend fun getPrescriptionRecord(@Body responseBody: JsonObject): BaseResponse<PrescriptionTemplate?>


    /**
     * 医生列表
     */
    @GET("/app-api/user/doctor/info/get-all-doctor-page")
    suspend fun getDoctorList(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("key") key: String?,
        @Query("position") position: String?,
        @Query("department") department: String?,
        @Query("type") type: Int,
        @Query("orderId") orderId: String?,
    ): BaseResponse<DoctorWrap?>

    /**
     * 医生问诊-转诊
     */
    @GET("/app-api/collaboration/order-consultation/have-consultation-transfer?")
    suspend fun consultationTransfer(
        @Query("id") id: String?,
        @Query("doctorIdNew") doctorIdNew: String,

        ): BaseResponse<Boolean?>


    /**
     * 职称列表
     */
    @GET("/app-api/hospital/position/list")
    suspend fun getPositionList(): BaseResponse<MutableList<ScreenTag>?>

    /**
     * 科室列表
     */
    @GET("/app-api/hospital/department/list")
    suspend fun getDepartmentList(): BaseResponse<MutableList<ScreenTag>?>


    /**
     * 会诊列表
     */
    @GET("/app-api/collaboration/medical-consultation/page")
    suspend fun getConsultationList(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("type") key: Int?,
    ): BaseResponse<ConsultationWarp?>

    /**
     * 会诊详情
     */
    @GET("/app-api/collaboration/medical-consultation/get")
    suspend fun getConsultationDetails(
        @Query("id") id: String
    ): BaseResponse<ConsultationOrder?>

    /**
     * 取消会诊
     */
    @GET("/app-api/collaboration/medical-consultation/cancel")
    suspend fun cancelConsultation(
        @Query("id") id: String
    ): BaseResponse<Any?>

    /**
     * 获取会诊password
     */
    @GET("/app-api/collaboration/medical-consultation/get-password")
    suspend fun getConsultationPassword(
        @Query("id") id: String
    ): BaseResponse<MeetInfo?>


    /**
     * 结束会诊
     */
    @POST("/app-api/collaboration/medical-consultation/finish")
    suspend fun finishConsultation(@Body responseBody: JsonObject): BaseResponse<Boolean?>

    /**
     * 跨院获取推荐医生列表
     */
    @GET("/app-api/user/doctor/info/get-doctor-limit")
    suspend fun recommendDoctor(): BaseResponse<MutableList<Doctor>?>


    /**
     * 获取患者列表
     */
    @GET("/app-api/user/patient-with-treatment/patient-page")
    suspend fun getPatientInfo(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("key") key: String?,
        @Query("tags") position: String?,
    ): BaseResponse<PatientWap?>


    /**
     * 获取患者问诊小结
     */
    @GET("/app-api/collaboration/order-consultation/consultation-order-brief-summary?")
    suspend fun getBriefSummary(@Query("patientId") patientId: String?): BaseResponse<MutableList<PatientISeeRecord>?>

    /**
     * 获取患者病历列表-分页 暂时作废
     */
    @GET("/app-api/user/patient-case-history/page?")
    suspend fun getPatientCaseHistory(
        @Query("pageNo") page: Int,
        @Query("pageSize") pageSize: Int,
        @Query("patientId") patientId: String?,
    ): BaseResponse<CaseHistoryWarp?>


    /**
     * 获取患者病历列表 关联HIS-分页
     */
    @GET("/app-api/collaboration/consultation-case-history/list?")
    suspend fun getPatientCaseHistoryHis(
        @Query("patientId") patientId: String?,
    ): BaseResponse<MutableList<InquiryCase>?>

    /**
     * 获取患者病历详情 关联HIS-分页
     */
    @GET("/app-api/collaboration/consultation-case-history/details?")
    suspend fun getPatientCaseHistoryDetailsHis(
        @Query("id") id: String?,
    ): BaseResponse<InquiryCase?>


    /**
     * 创建病历--非HIS 已作废
     */
    @POST("/app-api/user/patient-case-history/create")
    suspend fun createCaseHistory(@Body responseBody: JsonObject): BaseResponse<String?>

    /**
     * 举报
     */
    @POST("/app-api/user/reporting-records/create")
    suspend fun createReporting(@Body responseBody: JsonObject): BaseResponse<String?>


    /**
     * 获取我的患者列表
     */
    @GET("/app-api/user/patient-with-treatment/patient-list")
    suspend fun getMyPatient(
        @Query("key") key: String?,
        @Query("tags") tags: String?,
    ): BaseResponse<PatientWap>

    /**
     * 获取标签列表
     */
    @GET("/app-api/user/patient-with-treatment-tag/list")
    suspend fun getPatientTag(): BaseResponse<MutableList<Tag>?>


    /**
     * 查询获取病历His-保存病历之前调用
     */
    @GET("/app-api/collaboration/consultation-case-history/get")
    suspend fun getInquiryCaseHistory(@Query("patientId") patientId: String?): BaseResponse<InquiryCase>

    /**
     *新增患者标签
     */
    @POST("/app-api/user/patient-with-treatment-tag/create")
    suspend fun addPatientTag(@Body responseBody: JsonObject): BaseResponse<Long>?

    /**
     *新增/编辑问诊病历
     */
    @POST("/app-api/collaboration/consultation-case-history/save")
    suspend fun addInquiryCase(@Body inquiryCase: CreationInquiryCase): BaseResponse<Any?>

    /**
     *新增问诊病历--待办（针对于电话 和视频）
     */
    @POST("/app-api/collaboration/consultation-case-history/save-by-order")
    suspend fun addInquiryCaseForPhone(@Body inquiryCase: CreationInquiryCase): BaseResponse<Any?>

    /**
     *删除标签
     */
    @POST("/app-api/user/patient-with-treatment-tag/delete")
    suspend fun deletePatientTag(@Query("id") id: Long?): BaseResponse<Any>?

    /**
     * 获取我的患者详情
     */
    @GET("/app-api/user/patient-with-treatment/get")
    suspend fun getPatientDetails(@Query("id") id: String?): BaseResponse<PatientInfo?>


    /**
     * 创建会诊
     */
    @POST("/app-api/collaboration/medical-consultation/create")
    suspend fun createConsultation(@Body createConsultation: CreateConsultation?): BaseResponse<Any>?


    /**
     * 图片上传
     */
    @Multipart
    @POST("/app-api/infra/file/upload")
    suspend fun upload(@Part file: MultipartBody.Part): BaseResponse<String?>

    /**
     * CA图片上传
     */
    @Multipart
    @POST("/app-api/user/doctor/info/set-seal")
    suspend fun uploadCA(@Part file: MultipartBody.Part): BaseResponse<String?>

    /**
     * 护理-出发
     */
    @POST("/app-api/collaboration/nurse/nurse-departed")
    suspend fun nurseDeparted(@Body responseBody: JsonObject): BaseResponse<Boolean?>

    /**
     * 护理-通话
     */
    @GET("/app-api/collaboration/nurse/have-telephone-nurse?")
    suspend fun nurseCall(@Query("id") id: String?): BaseResponse<Boolean?>


    /**
     * 护理-到达
     */
    @POST("/app-api/collaboration/nurse/nurse-arrive")
    suspend fun nurseArrive(@Body responseBody: JsonObject): BaseResponse<Boolean?>


    /**
     * 护理-完成
     */
    @POST("/app-api/collaboration/nurse/nurse-finish")
    suspend fun nurseFinish(@Body responseBody: NurseFinish): BaseResponse<Any?>


    /**
     * 发送消息到平台
     */
    @POST("/app-api/collaboration/message-log/create-doctor")
    suspend fun sendMessage(@Body responseBody: JsonObject): BaseResponse<Boolean?>


    /**
     * 获取医生小程序码
     */
    @GET("/app-api/user/doctor/info/getHomePageQRCode")
    suspend fun getHomePageQRCode(
        @Query("doctorId") id: String?,
        @Query("version") version: String?
    ): BaseResponse<DoctorCode?>


    /**
     * 患者就诊记录
     * @param page    页码
     * @param pageSize 每页数量
     */
    @GET("/app-api/collaboration/order-consultation/consultation-order-page-patient")
    suspend fun getConsultationList(
        @Query("pageNo") pageNo: Int,
        @Query("page_size") pageSize: Int,
        @Query("patientId") patientId: String,
    ): BaseResponse<PatientISeeRecordWarp?>


    @GET("/app-api/hospital/order-inspection/cancel-self-inspection-doctor")
    suspend fun cancelInspection(
        @Query("id") id: String,
    ): BaseResponse<Any?>

    /**
     *
     *查询患者住院记录-列表
     */
    @GET("/app-api/hospital/hospitalized-log/patient-list?")
    suspend fun getPatientHospitalizedList(@Query("patientId") patientId: String?): BaseResponse<MutableList<HospitalizedLog>?>

    /**
     *
     *检查检验记录-患者详情
     */
    @GET("/app-api/hospital/order-inspection/list-doctor-patient?")
    suspend fun getPatientInspectionList(@Query("patientId") patientId: String?): BaseResponse<MutableList<InspectionRecord>?>


    /**
     *
     *检查检验记录-报告单
     */
    @GET("/app-api/hospital/order-inspection/get-report-list-doctor?")
    suspend fun getInspectionReport(
        @Query("patientId") patientId: String?,
        @Query("reportType") reportType: String,
        @Query("type") type: Int,
        @Query("startDate") startDate: String?,
        @Query("endDate") endDate: String?,
    ): BaseResponse<MutableList<InspectionReport>?>

    /**
     *
     *新的患者
     */
    @GET("/app-api/user/patient-with-treatment/patient-new-list")
    suspend fun getNewPatientList(): BaseResponse<MutableList<NewPatientWarp>?>


    /**
     * 获取用户关注
     */
    @GET("/app-api/user/doctor/info/get-patient-follow-page?")
    suspend fun getPatientFollowList(
        @Query("pageNo") pageNo: Int,
        @Query("page_size") pageSize: Int,
    ): BaseResponse<PatientFollowWarp?>

    /**
     * 住院证详情
     */
    @GET("/app-api/hospital/hospitalized-log/detail-info?")
    suspend fun getHospitalizedDetails(
        @Query("id") id: String
    ): BaseResponse<HospitalizedLog?>

    /**
     * 文章视频前三条
     */
    @GET("/app-api/information/knowledge-center/special-column-Limit")
    suspend fun getHomeVideoAndArticle(): BaseResponse<KnowledgeCenter?>

    /**
     *
     * 数据统计
     */
    @POST("/app-api/user/doctor/info/get-data-statistics")
    suspend fun getDataStatistics(@Body responseBody: JsonObject): BaseResponse<DataStatistics?>

    /**
     * 问诊评论分类统计
     */
    @GET("/app-api/collaboration/comment-consultation/get-consultation-serve-statistics")
    suspend fun getEvaluationClassification(): BaseResponse<EvaluationClassification?>


    /**
     * 问诊评论
     */
    @POST("/app-api/collaboration/comment-consultation/get-doctor-service-comment-page?")
    suspend fun getEvaluationList(@Body responseBody: JsonObject): BaseResponse<EvaluateWarp?>

    /**
     *   更新医生审核资料
     */
    @POST("/app-api/user/information/update")
    suspend fun updateExamineInfo(@Body responseBody: JsonObject): BaseResponse<Any?>

    /**
     * 查询医生审核信息
     */
    @GET("/app-api/user/information/query")
    suspend fun getExamineInfo():BaseResponse<AuthInfo?>
    /**
     * 医生修改基本信息
     */
    @POST("/app-api/user/doctor/info/update")
    suspend fun updateUserInfo(@Body responseBody: JsonObject): BaseResponse<User?>

    /**
     * 获取问诊记录
     */
    @GET("/app-api/collaboration/order-consultation/consultation-order-page-personal?")
    suspend fun getConsultationList(
        @Query("pageNo") pageNo: Int,
        @Query("page_size") pageSize: Int,
    ): BaseResponse<PatientISeeRecordWarp?>


    /**
     * 住院证记录-分页
     */
    @GET("/app-api/hospital/hospitalized-log/page?")
    suspend fun getHospitalizedLog(
        @Query("pageNo") pageNo: Int,
        @Query("page_size") pageSize: Int,
    ): BaseResponse<HospitalizedLogWarp?>


    /**
     * 住院证记录-分页
     */
    @GET("/app-api/hospital/order-inspection/page-doctor?")
    suspend fun getDoctorInspectionList(
        @Query("pageNo") pageNo: Int,
        @Query("page_size") pageSize: Int,
        @Query("type") type: Int,
    ): BaseResponse<InspectionRecordWarp?>

    /**
     * 获取处方支付状态金额统计
     */
    @GET("/app-api/prescription/order-prescription/query-order-pay-status-statistics")
    suspend fun getPrescriptionRecordStatus(): BaseResponse<PrescriptionStatusWarp?>

    /**
     * 查询病区
     */
    @GET("/app-api/hospital/department/list-inpatient-ward")
    suspend fun getInpatientWardList(): BaseResponse<MutableList<InpatientWard>?>

    /**
     * 查询入院情况
     */
    @GET("/app-api/hospital/condition/list")
    suspend fun getConditionList(): BaseResponse<MutableList<InpatientWard>?>


    /**
     * 开具住院证
     */
    @POST("/app-api/hospital/hospitalized-log/create")
    suspend fun createHospitalized(@Body responseBody: CreateHospitalized): BaseResponse<String?>

    /**
     * 开检查检验
     */
    @POST("/app-api/hospital/order-inspection/create-order-inspection")
    suspend fun createInspection(@Body responseBody: CreateInspectionWarp): BaseResponse<Any?>


    /**
     * 单独刷新token
     */
    @POST("/app-api/user/doctor/auth/refresh-token?")
    fun refreshTokenFlow(@Query("refreshToken") refreshToken: String): Call<BaseResponse<RefreshTokenResponse>>


}